* {
    box-sizing: border-box;
}

body {
    font-family: Poppins, sans-serif;
    margin: 20px;
    background: #fff;
    color: #333;
}


/* ---------- FEATURED FIRST ARTICLE ---------- */

.read-more {
    color: #1074de !important;
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1887fe !important;
}


/* ---------- NEW NAV MODEL ---------- */

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    margin-top: 25px;
    padding: 0 25px;
}

.left-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.custom-nav li a {
    padding: 10px 25px;
    border-radius: 8px;
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    display: inline-block;
    transition: background-color .3s;
    cursor: pointer;
}

.custom-nav li a.hover,
.custom-nav li a.active {
    background: #0056b3;
    color: #fff;
}

.right-search {
    display: flex;
    align-items: center;
}


/* Search */

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 10px;
    width: 44px;
    min-width: 44px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
    overflow: hidden;
    transition: width .3s ease;
}

.search-box.active {
    width: 260px;
}

.search-btn {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #111;
    stroke-width: 2.25;
}

.search-input {
    border: 0;
    outline: 0;
    font-size: 14px;
    flex: 0 0 0;
    width: 0;
    opacity: 0;
    pointer-events: none;
    padding: 6px 0;
}

.search-box.active .search-input {
    flex: 1 1 auto;
    width: auto;
    opacity: 1;
    pointer-events: auto;
    padding: 6px 0;
    transition: opacity .25s ease;
}


/* ---------- ARTICLES GRID ---------- */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
}

.section-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 60px;
    padding: 0 30px;
}

.article-card {
    display: flex;
    flex-direction: column;
}

.article-card img {
    width: 100%;
    height: 234px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.08);
}

.article-card .article-content {
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    height: 150px;
    gap: 6px;
    color: #333
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: bold;
    color: #0073e6;
    margin-bottom: 8px;
}

.article-meta span:last-child {
    color: #888;
    font-weight: normal;
}

.article-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #111
}

@media (max-width:768px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    .nav-wrapper {
        flex-direction: column;
        align-items: center;
        /* Nav center align */
    }
    .left-nav {
        justify-content: center;
        width: 100%;
    }
    .custom-nav {
        justify-content: center;
    }
    .right-search {
        width: 100%;
        margin-top: 10px;
    }
    .search-box.active {
        width: 100%;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
}


/* blog readmore css*/

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    line-height: 1.7;
    color: #111;
}


/* --------------------------------- Categories + Search  */

.categories {
    display: flex;
    align-items: center;
}

select,
.search input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search {
    margin-left: 16px;
}


/* --------------------------------- Main Content --------------------------------- */

main {
    max-width: 850px;
    margin: 32px auto;
    padding: 0 16px;
}

article {
    margin-bottom: 64px;
}

article h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #111;
    text-align: left;
}

article h3 {
    font-size: 18px;
    margin-top: 32px;
    margin-bottom: 12px;
}

article h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #111;
    line-height: 1.6;
}

article .meta {
    font-size: 14px;
    color: #4719dc;
    margin-bottom: 16px;
}


/* --------------------------------- Tags --------------------------------- */

.tags {
    margin: 8px 0 24px;
}

.tags span {
    display: inline-block;
    background: #f2f2f2;
    color: #333;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 6px;
}


/* --------------------------------- Paragraphs --------------------------------- */

p {
    font-size: 16px;
    color: #111;
    line-height: 1.8;
}


/* --------------------------------- Article Banner Image --------------------------------- */

article>img,
.blog-banner {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 24px auto;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}


/* --------------------------------- Table of Contents --------------------------------- */

.toc {
    margin: 32px 0;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.toc h3 {
    margin-top: 0;
    font-size: 19px;
    font-weight: 600;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc ul li {
    margin: 8px 0;
}

.toc a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
}


/* --------------------------------- Image Container (inline images) --------------------------------- */

.img-container {
    max-width: 100%;
    margin: 32px 0;
    text-align: center;
}

.img-container img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}


/* --------------------------------- Call to Action (CTA) --------------------------------- */

.cta {
    max-width: 750px;
    width: 100%;
    margin: 48px auto;
    padding: 24px;
    background: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 12px;
    text-align: center;
    color: #111;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.cta h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 700;
    color: #000;
}

.cta .brand {
    font-weight: 600;
    color: #0073aa;
}

.cta-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.cta-btn:hover {
    background: #333;
}


/* --------------------------------- Back Button --------------------------------- */

.back-btn {
    display: block;
    width: fit-content;
    padding: 12px 22px;
    margin: 20px auto;
    background: #222;
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    background: #444;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.back-btn:active {
    background: #000;
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}


/* --------------------------------- Blog Article Lists (Fix for bullets) --------------------------------- */

article ul {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 24px;
    margin: 16px 0;
}

article ul li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: #111;
    font-size: 15px;
}


/* --------------------------------- Tables --------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 12px 10px;
    text-align: left;
}

table th {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
}

table td {
    background: #fafafa;
}

footer p {
    font-size: 14px;
}


/* --------------------------------- Responsive --------------------------------- */

@media (max-width: 768px) {
    .categories {
        margin-top: 12px;
        width: 100%;
    }
    .search {
        margin-left: auto;
    }
    .cta {
        width: 100%;
    }
    article h2 {
        font-size: 24px;
    }
    article h3 {
        font-size: 18px;
    }
    article h4 {
        font-size: 16px;
    }
    p {
        font-size: 15px;
        margin-bottom: 14px;
    }
    .toc {
        padding: 16px;
    }
    article>img,
    .blog-banner {
        max-height: 300px;
    }
    .tags span {
        font-size: 12px;
        padding: 4px 10px;
    }
    .back-btn {
        font-size: 14px;
        padding: 10px 18px;
    }
}